/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function createViewport(map,toolbarItems,center) {
    viewport = new Ext.Viewport({
        layout: 'border',
        items: [
        new Ext.BoxComponent({
            region: 'north',
            el: 'north',
            height: 52,
            margins: {
                left: 5,
                top: 5
            }
        }), {
            region: 'west',
            id:'west',
            title: 'LayerTree',
            width: 200,
            border: true,
            margins: '5 0 0 5',
            frame: false,
            split: true,
            layout: 'fit',
            collapsible: true,
            items: [{
                xtype: 'layertree',
                map: map,
				enableDD: true,
                border: false
            }]
        },{
            region: 'center',
            id:'center',
            layout: 'fit',
            frame: false,
            border: true,
            margins: '5 5 0 0',
            items: [{
                xtype: 'gx_mappanel',
                //html:"<div id='map'> </div>",
                map: map,
                tbar: toolbarItems,
                border: false,
                center: center,
                zoom: 9
            }]
        },{
            region: 'south',
            id: 'statusBar',
            border: false,
            bodyStyle: 'text-align:left;padding:0px;',
            height: 25,
            margins: '5 0 0 0',
            frame: true,
            html: 'a status bar'
        }
        ]
    });
};
